-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TS migration] Migrate MoneyTemporaryForRefactorRequestParticipantsSe… #41216
[TS migration] Migrate MoneyTemporaryForRefactorRequestParticipantsSe… #41216
Conversation
31c2be1
to
2cdb8ec
Compare
…lector.js to MoneyRequestParticipantsSelector.tsx
2cdb8ec
to
6ba7034
Compare
@pasyukevich Please speed up this one, this is the last issue of this epic that is over the deadline (1 May) |
…equestParticipantsSelector
|
||
const isIOUSplit = iouType === CONST.IOU.TYPE.SPLIT; | ||
const isCategorizeOrShareAction = [CONST.IOU.ACTION.CATEGORIZE, CONST.IOU.ACTION.SHARE].includes(action); | ||
const isCategorizeOrShareAction = ([CONST.IOU.ACTION.CATEGORIZE, CONST.IOU.ACTION.SHARE] as string[]).includes(action); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nab: you can use some
instead of includes
to avoid assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
@@ -131,7 +124,7 @@ function MoneyTemporaryForRefactorRequestParticipantsSelector({participants, onF | |||
isCategorizeOrShareAction ? 0 : undefined, | |||
); | |||
|
|||
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, participants, chatOptions.recentReports, chatOptions.personalDetails, personalDetails, true); | |||
const formatResults = OptionsListUtils.formatSectionsFromSearchTerm(debouncedSearchTerm, participants.map((participant) => ({...participant, reportID: participant.reportID ?? ''})), chatOptions.recentReports, chatOptions.personalDetails, personalDetails, true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this map is added ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of type diff - Participant[] vs ReportUtils.OptionData[]
ReportUtils.OptionData[] requires reportID with value
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, other than that LGTM!
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-07.at.18.12.21.movAndroid: mWeb ChromeScreen.Recording.2024-05-07.at.18.09.07.moviOS: NativeScreen.Recording.2024-05-07.at.18.11.47.moviOS: mWeb SafariScreen.Recording.2024-05-07.at.18.07.31.movMacOS: Chrome / SafariScreen.Recording.2024-05-07.at.18.05.46.movMacOS: DesktopScreen.Recording.2024-05-07.at.18.09.44.mov |
(canUseP2PDistanceRequests || iouRequestType !== CONST.IOU.REQUEST_TYPE.DISTANCE) && | ||
![CONST.IOU.TYPE.PAY, CONST.IOU.TYPE.TRACK, CONST.IOU.TYPE.INVOICE].includes(iouType) && | ||
![CONST.IOU.ACTION.SHARE, CONST.IOU.ACTION.SUBMIT, CONST.IOU.ACTION.CATEGORIZE].includes(action); | ||
(canUseP2PDistanceRequests ?? iouRequestType !== CONST.IOU.REQUEST_TYPE.DISTANCE) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using ?? will change the behavior, could you help to explain about this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It caused this bug: Can't make multiple selection
Screen.Recording.2024-05-07.at.15.30.00.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted
There is no need for this change, missed logic during the migration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM but we're on a merge freeze this week so I'm holding off merging at this time.
I've removed the HOLD on this and will go ahead and merge it. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@tgolen Could you help create an issue handling the payment for PR reviewing? |
Sure, can you please comment on https://github.com/Expensify/Expensify/issues/395017 and I'll assign it to you. |
@tgolen This is an internal repo. I can't access to it |
Arg, wrong repo. Sorry! |
🚀 Deployed to staging by https://github.com/tgolen in version: 1.4.73-0 🚀
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.73-7 🚀
|
…lector.js to MoneyRequestParticipantsSelector.tsx
Details
Fixed Issues
$ #29107 - MoneyTemporaryForRefactorRequestParticipantsSelector.js to MoneyRequestParticipantsSelector.tsx migration part
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-native-converted.webm
Android: mWeb Chrome
android-web-converted.webm
iOS: Native
ios-native-converted.mp4
iOS: mWeb Safari
ios-web-converted.mp4
MacOS: Chrome / Safari
desktop-web-converted.mov
MacOS: Desktop
desktop-native-converted.mov